<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>添加课程</title>
    <link rel="stylesheet" href="/layui/css/layui.css">
    <script src="/layui/src/layui.js"></script>
    <script src="/layui/src/jquery-3.2.1.min.js"></script>

    <link href="/video/css/video-js.min.css" rel="stylesheet">

    <link rel="stylesheet" href="/teacher/css/CourseAdd.css">
    <script type="text/javascript" src="/teacher/js/CourseAdd.js"></script>

</head>
<body>
    <div class="layui-container" id="div1">

        <!--头部-->
        <div class="layui-row" id="List_Header">
            <div class="layui-col-xs11 layui-col-sm11 layui-col-md11 layui-col-lg11">
                <span id="color_id">▉</span>
                <span id="List_Header_span">添加课程</span>
            </div>
            <div class="layui-col-xs1 layui-col-sm1 layui-col-md1 layui-col-lg1">
                <button type="button" class="layui-btn " onclick="go()">
                    <i class="layui-icon layui-icon-left"></i> 返回
                </button>
            </div>
        </div>
        <!--表单-->
        <form class="layui-form "  id="form_id">
            <!--图片-->
            <div id="img_div">
                <!--<img src="../img/CourseAdd.png" id="ProductAddImg"/>-->
            </div>
            <div id="div_id">
                <!--课程分类-->
                <div class="layui-form-item">
                    <label class="layui-form-label">课程分类：</label>
                    <div class="layui-input-block">
                        <input type="text" name="className" required lay-verify="required"  autocomplete="off" class="layui-input" disabled="disabled" id="categoryId"/>
                        <input type="hidden" name="classId" required lay-verify="required"  autocomplete="off" class="layui-input" id="id"/>
                        <img src="../img/icon27.gif" width="20px" height="20px" id="icon27_id" onclick="addProductCategory()"/>
                    </div>
                </div>
                <p id="p_id">您当前选择的商品类别是：<span></span></p>

                <!--课程名称-->
                <div class="layui-form-item">
                    <label class="layui-form-label">课程名称：</label>
                    <div class="layui-input-block">
                        <input type="text" name="courseName" id="courseName" required lay-verify="required"  autocomplete="off" class="layui-input" ID="productName"/>
                    </div>
                </div>


                <!--课程图片-->
                <div class="layui-form-item upload_div">
                    <label class="layui-form-label">课程图片：</label>
                    <div class="layui-input-block">
                        <button type="button" class="layui-btn upload_btn" id="uploadImgBtn">上传图片</button>
                    </div>
                </div>

                <!--获取商品主图-->
                <input type="hidden" id="url" name="url" class="layui-input"/>

                <!--预览图-->
                <div class="layui-form-item" id="img_div2">
                    <label class="layui-form-label">预览图：</label>
                    <div id="img_div3">
                        <div class="layui-input-block" id="img_div4">
                            <i class="layui-icon layui-icon-up" id="up" onclick="upUploadImg()"></i>
                        </div>
                    </div>
                </div>



                <!--课程视频-->
                <div class="layui-form-item upload_div">
                    <label class="layui-form-label">课程视频：</label>
                    <div class="layui-input-block">
                        <button type="button" class="layui-btn upload_btn" onclick="uploadBtn()">上传视频</button>
                        <input type="hidden" id="uploadBtn2"/>
                    </div>
                </div>
                <!--上传视频-->
                <div class="layui-form-item" id="div_video">

                  <!--进度条-->
                 <div class="layui-progress layui-progress-big" lay-showPercent="yes" lay-filter="progressBar" id="progressBar">
                     <div class="layui-progress-bar layui-bg-blue" lay-percent="0%"></div>
                 </div>

                </div>
                <input type="hidden" id="courseUrl" name="courseUrl"/>


                <!--课程介绍-->
                <div class="layui-form-item">
                    <label class="layui-form-label">课程介绍：</label>
                    <div class="layui-input-block">
                        <textarea class="layui-textarea textarea" name="courseIntro" id="product_description" placeholder="请输入内容"></textarea>
                    </div>
                </div>

                <!--课程序号-->
                <div class="layui-form-item">
                    <label class="layui-form-label">课程序号：</label>
                    <div class="layui-input-block">
                        <input type="text" name="courseNo" required lay-verify="required"  name="courseNo" autocomplete="off" class="layui-input" oninput = "value=value.replace(/[^\d]/g,'')"/>
                    </div>
                </div>

                <!--关键字-->
                <div class="layui-form-item">
                    <label class="layui-form-label">关键字：</label>
                    <div class="layui-input-block">
                        <input type="text" name="coursePrimary" required lay-verify="required" name="coursePrimary" autocomplete="off" class="layui-input" maxlength="10"/>
                    </div>
                </div>

                <!--课程售价-->
                <div class="layui-form-item">
                    <label class="layui-form-label">课程售价：</label>
                    <div class="layui-input-block">
                        <input type="text" name="courseNprice" required lay-verify="required" name="currentpriceProduct" autocomplete="off" class="layui-input" onkeyup="value=value.replace(/[^\d{1,}\.\d{1,}|\d{1,}]/g,'')"/>
                    </div>
                </div>

                <!--课程推荐-->
                <div class="layui-form-item radio_class">
                    <label class="layui-form-label">课程推荐：</label>
                    <div class="layui-input-block">
                        <input type="radio" name="recommend" value="2" title="新品" checked="checked"/>
                        <input type="radio" name="recommend" value="3" title="推荐"/>
                        <input type="radio" name="recommend" value="4" title="其它"/>
                    </div>
                </div>

                <div class="layui-form-item">
                    <div class="layui-input-block" id="btn_id">
                        <button class="layui-btn" lay-submit lay-filter="formDemo">完成，提交课程</button>
                    </div>
                </div>

                <!--上架状态-->
                <input type="hidden" name="courseStatus" value="3"/>

                <!--审核状态-->
                <input type="hidden" name="courseCstatus" value="4"/>


                <!--创建人-->
                <input type="hidden" name="createId" id="createId">
                <input type="hidden" name="userId" id="userId">

                <!--类型-->
                <input type="hidden" name="type" value="3"/>

                <!--视频时长-->
                <input type="hidden" id="courseTime" name="courseTime">




                <!--点赞数量-->
                <input type="hidden" name="likeNum" value="0">

                <!--分享数量-->
                <input type="hidden" name="shareNum" value="0">

                <!--收藏数量-->
                <input type="hidden" name="collectNum" value="0">

                <!--预览数量-->
                <input type="hidden" name="lookNum" value="0">

                <!--销售数量-->
                <input type="hidden" name="saleNum" value="0">



            </div>
        </form>
    </div>

    <!--预览图点击计数-->
    <input type="hidden" id="num"/>

</body>
</html>
